-
Notifications
You must be signed in to change notification settings - Fork 8
Ensure DRBD sync before resizing volumes on thick provisoned linstor SR #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.2.12-8.3
Are you sure you want to change the base?
Conversation
d5c806e to
545ac97
Compare
545ac97 to
6fc3638
Compare
drivers/linstorvolumemanager.py
Outdated
| # We can't resize anything until DRBD is up to date | ||
| # We wait here for 5min max and raise an easy to understand error for the user | ||
| # 5min is an arbitrary time, it's impossible to get a fit all situation value | ||
| # and it's currently impossible to know how much time we have to wait | ||
| # This is mostly an issue for thick provisioning, thin isn't affected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need to discuss comment formatting for the new stack, especially regarding period at the end of sentences. I'm a fan of this for pydocstyle, but also for comments. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added proper punctuation
drivers/linstorvolumemanager.py
Outdated
| try: | ||
| self._linstor.resource_dfn_wait_synced(volume_name, wait_interval=1.0, timeout=60*5) | ||
| except linstor.LinstorTimeoutError: | ||
| raise linstor.LinstorTimeoutError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| raise linstor.LinstorTimeoutError( | |
| raise LinstorVolumeManagerError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| result = self._linstor.volume_dfn_modify( | ||
| rsc_name=volume_name, | ||
| volume_nr=0, | ||
| size=new_size | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to keep the initial call before waiting for the sync to complete. The idea would then be to display a message saying that we need to wait, which would create a sort of block/symmetry with your message suggestion "DRBD is up to date, syncing took...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Experience proves that we do need to wait, especially for early steps. That's why we had the previous retry mechanism.
Either we keep the previous process which is a bit bruteforce or we just wait before but we can't keep both.
I don't see the benefit of calling the function if we know that it's gonna crash anyway.
I think we should discuss this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to discuss this, I'm not sure this would be benificial
6fc3638 to
24dece5
Compare
ec1f735 to
1b531eb
Compare
66c7c8e to
aaaab27
Compare
1b531eb to
9b32a9d
Compare
fix resize typo for linstor on raw VDI Signed-off-by: Antoine Bartuccio <[email protected]>
Avoid most common drbd sync errors during resize with a cleaner wait mechanism and friendly user error Signed-off-by: Antoine Bartuccio <[email protected]>
9b32a9d to
67272a9
Compare
When resizing a VDI on a thick provisioned linstor SR, we need to wait for DRBD to be up to date.
This is dependent on previous operations that we can't know.
If we wait too much, we stop and return an error to the user letting him know that he needs to try later.
Also fix an issue when resizing raw images.